Skip to content

Conversation

@jviau
Copy link
Member

@jviau jviau commented Jan 24, 2025

This PR introduces new create builder overloads for the client and worker with a slight difference. The existing overloads all take in a callback to configure the builder. The new overloads return the builder. This allows for a slightly cleaner HostApplicationBuilder experience. Some samples have also been updated to use HostApplicationBuilder and the new overloads.

Current style:

services.AddDurableTaskWorker(b =>
{ 
    b.Configure(...);
    b.AddTasks(...);
    b.UseGrpc();
});

New style:

services.AddDurableTaskWorker()
    .Configure(...)
    .AddTasks(...)
    .UseGrpc();

@jviau jviau requested a review from cgillum January 24, 2025 18:04
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Glad to have this simplified setup experience. Thanks!

@jviau jviau merged commit 2ff37c5 into microsoft:main Jan 24, 2025
4 checks passed
@jviau jviau deleted the app-builder branch January 24, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants